Skip to content

Remove always true if check #5406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Conversation

STRd6
Copy link
Contributor

@STRd6 STRd6 commented Apr 4, 2022

This check has always been true since Node 0.3.0. It was added here: c4a3e17 and seems to rely on the behavior of Module#_compile from before require.extensions. If require.extensions is ever removed (it is deprecated after all) then CoffeeScript.run will no longer work. It will pass CoffeeScript source code to Module#_compile which is doomed to fail.

Browser code doesn't touch this path at all and is unaffected.

This check has always been true since Node 0.3.0. It was added here:
jashkenas@c4a3e17
and seems to rely on the behavior of `Module#_compile` from before
`require.extensions`. If `require.extensions` is ever removed (it is
deprecated after all) then `CoffeeScript.run` will no longer work. It
will pass CoffeeScript source code to `Module#_compile` which is doomed
to fail.

Browser code doesn't touch this path at all and is unaffected.
@STRd6
Copy link
Contributor Author

STRd6 commented Apr 4, 2022

In digging through the source mapping nitty gritty I found this small oddity. I'd prefer to split off small self contained cleanup PRs when possible so that the eventual source mapping PR isn't totally massive and coupled with indirectly related cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants